Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
Firefox está lanzando "DOMException no detectada: la operación no es segura". cuando se usa history.replaceState con URL que contiene autenticación básica

Este problema solo ocurre en Firefox, también probé Chrome y está bien allí. Creé una página web simple con fines de prueba para reproducir el problema. El enlace está aquí . Los contenidos de la página son:

 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>URL Test with basic auth</title> <meta name="description" content="Test for Firefox and handling of history API when basic auth is present"> <meta name="author" content="Ondrej"> </head> <body> <h1>URL Test</h1> <script> const addParameter = () => window.history.replaceState(null, '', '/?ok=1') window.addEventListener('DOMContentLoaded', () => { addParameter() }) </script> </body> </html>

Al cargar el sitio web, quiero agregar un parámetro de consulta a la URL mediante el uso de la API de historial replaceState .

Ahora, el servidor web no contiene ninguna autenticación básica HTTP real, pero si lo usa como parte de la URL, arroja el error. Intente copiar y pegar esto en su barra de URL:

https://user:pass@offbeat-cattle.surge.sh

El problema solo ocurre en el navegador Firefox (probado en 94.0.1 ) donde no puede agregar el parámetro de consulta a la URL y arroja este error en la consola:

 Uncaught DOMException: The operation is insecure.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!